/*
 * test_omp.cpp
 *
 *  Created on: Jun 28, 2014
 *      Author: killerg
 */


#include<omp.h>
#include <stdio.h>

bool test_omp() {

	omp_set_num_threads(2);

	int x = 0;

	#pragma omp parallel for schedule (guided)
	for (int i=0; i<100000; ++i) {
		#pragma omp critical
		x++;
	}

	printf("%d\n", x);

	return true;
}
